package programDetails;
/*
3. 重写和重载区别
    重载 Overload
 */
public class _1_3_CompareOverloadOverRide_1 {
    public static void main(String[] args) {
        Overload o=new Overload();
        System.out.println(o.test());
        System.out.println("-----------------");
        o.test(1);
        System.out.println("-----------------");
        System.out.println(o.test(1,"test3"));
        System.out.println("-----------------");
        System.out.println(o.test("test4",2));
    }
}
class Overload{
    public int test(){
        System.out.println("Test1");
        return 1;
    }
    public void test(int a){
        System.out.println("Test2");
    }
    public String test(int a,String s){
        System.out.println("Test3");
        return s;
    }
    public String test(String s,int a){
        System.out.println("Test4");
        return s;
    }
}
/*

 */